package com.qf.ability.search.entity;

import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.InnerField;
import org.springframework.data.elasticsearch.annotations.MultiField;

/**
 * description:
 * author: Ken
 * 公众号：Java架构栈
 */
@Data
public class GoodsGuigeSearch {

    @Field(type = FieldType.Keyword)
    private String guigeName;
    @MultiField(
            mainField =  @Field(type = FieldType.Keyword),
            otherFields = {
                    @InnerField(suffix = "analyer", type = FieldType.Text, analyzer = "ik_max_word"),
                    @InnerField(suffix = "pinyin", type = FieldType.Text, analyzer = "pinyin")
            }
    )
    private String guigeVal;
}
